export default {
  data() {
    return {
      uNavbarBgColor: "transparent",
      uNavbarTitleColor: "transparent",
      uNavbarIconColor: "var(--color-white)",
    };
  },
  onPageScroll(e) {
    let per = e.scrollTop / 200;
    if (per < 0) per = 0;
    else if (per > 1) per = 1;

    this.uNavbarBgColor = `rgba(245,245,245,${per})`;
    this.uNavbarTitleColor = `rgba(48,49,51,${per})`;
    this.uNavbarIconColor = `rgba(${255 - (255 - 96) * per},${
      255 - (255 - 98) * per
    },${255 - (255 - 102) * per})`;
  },
};
